Repository navigation
fix(widget): announce new messages and the typing indicator to screen readers - #153
Merged
Merged
Conversation
anurag629
approved these changes
Oct 18, 2026
anurag629
left a comment
Member
There was a problem hiding this comment.
Thanks @prakashNalla. I merged it onto current dev: build, typecheck and all 265 tests pass, and the four new tests fail with dev's widget code. Everything in #64 is covered and the changeset is there. Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
The messages container now has
role="log"andaria-live="polite", so new replies are read out. The typing indicator gets thetypingIndicatorlocale text in a visually hidden span (new.cc-sr-onlyclass inwidget.css) and its three dots arearia-hidden. The textarea gets anaria-labelfrom the placeholder, and a reply hasaria-busy="true"while it streams, which is removed once it's complete, so it isn't re-read on every chunk.Closes #64
How I tested this
pnpm install --frozen-lockfile,pnpm -r build,pnpm -r typecheck,pnpm test(29 files / 265 tests pass) andpnpm changeset status, on Node v22.23.3 with pnpm 9.15.0aria-busywhile streaming, the textarea label). All 4 fail without the change.dev.htmlagainst a small local server that streams a reply word by word, and read the accessibility tree in headless Chrome (puppeteerpage.accessibility.snapshot()):textbox "Type a message..."logcontaining "Typing...", dotsaria-hidden="true"aria-busy="true", after the last chunk it's gone, and thelogholds the full replyAI assistance
Claude helped me w/ the understanding of the tests.
Checklist
devpnpm -r build,pnpm testandpnpm -r typecheckpass locallypnpm changeset) if this changescore,widgetorserver